<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <link rel="icon" type="image/x-icon" th:href="@{/img/favicon.ico}">

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>试题</title>

    <script th:src="@{/js/jquery-3.3.1.js}"></script>
    <script th:src="@{/js/popper.js}"></script>
    <script th:src="@{/js/toolkit.js}"></script>
    <script th:src="@{/js/component.js}"></script>

    <link th:href="@{/css/antd.css}" rel="stylesheet">
    <link th:href="@{/css/docs.css}" rel="stylesheet">
    <link th:href="@{/css/toolkit-light.css}" rel="stylesheet">

    <style>
        .margin_top {
            margin-top: 12px;
        }

        .logo {
            width: 8%;
            height: auto;
        }

        .nav_top {
            margin-top: 5px;
            right: 1.5%;
        }

        a:link, a:visited, a:hover, a:active {
            text-decoration:none;
        }

        .m-l-lg {
            margin-left: 64px !important;
        }
    </style>
</head>
<body>
<div class="m-l-md m-r-md">
    <!--导航栏-->
    <div class="text-md-left margin_top">
        <div class="row">
            <img class="logo col-md-1" th:src="@{/img/ahza-black-oj.png}">
            <ul class="nav nav-bordered col-md-10 nav_top">
                <li class="nav-header form-inline">
                    <h1>后台</h1>
                </li>
                <li class="margin_top">
                    <a href="/main">首页</a>
                </li>
                <li class="active margin_top"><a href="/paper">试卷</a></li>
                <li class="margin_top"><a href="/quiz">考试</a></li>
                <li class="margin_top"><a href="/result">成绩</a></li>
                <li class="margin_top"><a href="/logout">退出系统</a></li>
            </ul>
        </div>
    </div>
    <!--分割线-->
    <div class="row">
        <div class="ant-divider ant-divider-horizontal col-md-12">
            <h3 class="hr-divider-content hr-divider-heading"></h3>
        </div>
    </div>

    <div class="dashhead">
        <div class="dashhead-titles">
            <h3 class="dashhead-title">当前试题</h3>
        </div>
    </div>
    <div class="hr-divider">
        <h2 class="hr-divider-content hr-divider-heading">
            试题详情
        </h2>
    </div>
    <div class="docs-example">
        <form action="/updateQuestion" method="post">
            <input type="hidden" th:value="${id}" name="paperId"/>
            <input type="hidden" th:value="${questionId}" name="questionId"/>
            <div class="row">
                <label>试题内容</label>
                <input type="text" class="form-control" name="title" th:value="${title}">
            </div>
            <div class="row">
                <label class="col-md-12">选项一</label>
                <div class="radio custom-control custom-radio ant-col-md-1">
                    <div class="row col-md-1 m-l-md">
                        <label th:if="${choice_1_isRight} == 'true'">
                            <input type="radio" name="isRight" value="1" checked>
                            <span class="custom-control-indicator"></span>
                        </label>

                        <label th:if="${choice_1_isRight} == 'false'">
                            <input type="radio" name="isRight" value="1">
                            <span class="custom-control-indicator"></span>
                        </label>
                    </div>
                </div>
                <div class="ant-col-md-23 form-group">
                    <input type="text" class="form-control" id="answer_1_input" name="answer_1_input" placeholder="选项一内容" th:value="${choice_1_content}" required>
                </div>
                <div class="ant-col-md-23 form-group m-l-lg">
                    <input type="text" class="form-control" id="answer_1_illus" name="answer_1_illus" placeholder="若选项一被错选的解答" th:value="${choice_1_illustration}" required>
                </div>
            </div>

            <div class="row">
                <label class="col-md-12">选项二</label>
                <div class="radio custom-control custom-radio ant-col-md-1">
                    <div class="row col-md-1 m-l-md">
                        <label th:if="${choice_2_isRight} == 'true'">
                            <input type="radio" name="isRight" value="2" checked>
                            <span class="custom-control-indicator"></span>
                        </label>

                        <label th:if="${choice_2_isRight} == 'false'">
                            <input type="radio" name="isRight" value="2">
                            <span class="custom-control-indicator"></span>
                        </label>
                    </div>
                </div>
                <div class="ant-col-md-23 form-group">
                    <input type="text" class="form-control" id="answer_2_input" name="answer_2_input" placeholder="选项二内容" th:value="${choice_2_content}" required>
                </div>
                <div class="ant-col-md-23 form-group m-l-lg">
                    <input type="text" class="form-control" id="answer_2_illus" name="answer_2_illus" placeholder="若选项二被错选的解答" th:value="${choice_2_illustration}" required>
                </div>
            </div>

            <div class="row">
                <label class="col-md-12">选项三</label>
                <div class="radio custom-control custom-radio ant-col-md-1">
                    <div class="row col-md-1 m-l-md">
                        <label th:if="${choice_3_isRight} == 'true'">
                            <input type="radio" name="isRight" value="3" checked>
                            <span class="custom-control-indicator"></span>
                        </label>

                        <label th:if="${choice_3_isRight} == 'false'">
                            <input type="radio" name="isRight" value="3">
                            <span class="custom-control-indicator"></span>
                        </label>
                    </div>
                </div>
                <div class="ant-col-md-23 form-group">
                    <input type="text" class="form-control" id="answer_3_input" name="answer_3_input" placeholder="选项三内容" th:value="${choice_3_content}" required>
                </div>
                <div class="ant-col-md-23 form-group m-l-lg">
                    <input type="text" class="form-control" id="answer_3_illus" name="answer_3_illus" placeholder="若选项三被错选的解答" th:value="${choice_3_illustration}" required>
                </div>
            </div>

            <div class="row">
                <label class="col-md-12">选项四</label>
                <div class="radio custom-control custom-radio ant-col-md-1">
                    <div class="row col-md-1 m-l-md">
                        <label th:if="${choice_4_isRight} == 'true'">
                            <input type="radio" name="isRight" value="4" checked>
                            <span class="custom-control-indicator"></span>
                        </label>

                        <label th:if="${choice_4_isRight} == 'false'">
                            <input type="radio" name="isRight" value="4">
                            <span class="custom-control-indicator"></span>
                        </label>
                    </div>
                </div>
                <div class="ant-col-md-23 form-group">
                    <input type="text" class="form-control" id="answer_4_input" name="answer_4_input" placeholder="选项四内容" th:value="${choice_4_content}" required>
                </div>
                <div class="ant-col-md-23 form-group m-l-lg">
                    <input type="text" class="form-control" id="answer_4_illus" name="answer_4_illus" placeholder="若选项四被错选的解答" th:value="${choice_4_illustration}" required>
                </div>
            </div>
            <button class="btn btn-primary col-md-3">确认修改</button>
        </form>
    </div>
</div>
</body>
</html>